Cover TOC Chap Prev Chap Prev Fig Next Fig Next Chap

Chapter 12: Inlining Files

../ch12/12fig03.gif
Figure 12.3

A simple temple built by inlining one archway row from ╥archrow.wrl╙ and repeatedly instancing it.

12fig03.wrl
Click on the image to view the VRML scene.

#VRML V2.0 utf8
# The VRML 2.0 Sourcebook
# Copyright (c) 1997
# Andrea L. Ames, David R. Nadeau, and John L. Moreland
Group {
    children [
    # Ground
        Shape {
            appearance Appearance {
                material Material {
                    diffuseColor 0.0 1.0 0.0
                }
            }
            geometry Box {
                size 50.0 0.1 50.0
            }
        },
    # Back archway row
        Transform {
            translation 0.0 0.0 -4.0
            children DEF ArchRow Inline {
                bboxSize   5.0 8.0 10.0
                bboxCenter 1.0 4.0 -5.0
                url "archrow.wrl"
            }
        },
    # Front archway row
        Transform {
            translation 0.0 0.0 4.0
            rotation 0.0 1.0 0.0 3.14
            children USE ArchRow
        },
    # Left archway row
        Transform {
            translation -4.0 0.0 0.0
            rotation 0.0 1.0 0.0 1.57
            children USE ArchRow
        },
    # Right archway row
        Transform {
            translation 4.0 0.0 0.0
            rotation 0.0 1.0 0.0 -1.57
            children USE ArchRow
        }
    ]
}